<?php
// @formatter:off
/**
 * @file WCUserDataHolder.php
 * @author Alejandro Dario Simi
 * @date $Date: 2013-07-18 22:13:05 +0000 (Thu, 18 Jul 2013) $
 *
 * $Id: WCUserDataHolder.php 97 2013-07-18 22:13:05Z daemonraco@gmail.com $
 * $URL: http://wcomix.googlecode.com/svn/tags/wcomix-1.0.0.1/includes/holders/WCUserDataHolder.php $
 */
// @formatter:on

require_once "{$wcPaths["includes-directory"]}/representations/WCUserData.php";

/**
 * @class WCUserDataHolder This class is a holder for representations of table
 * '%user_data', in other words, a holder for WCUserData objects.
 */
class WCUserDataHolder extends WCBasicHolder {
	/**
	 * @var WCUserDataHolder Pointer to the singleton instance.
	 */
	protected static $_Instance;
	/**
	 * @var string Class name of the objects to be held.
	 */
	protected $_PropertiesItemClass = "WCUserData";
	/**
	 * @var string This is the prefix of every column on the table
	 * '%user_data'.
	 */
	protected $_PropertiesPrefix = "usd_";
	/**
	 * @var string This is the name of the table represented by WCUserData
	 * objects. In this case, '%user_data'.
	 */
	protected $_PropertiesTable = "user_data";
	/**
	 * @var string This property indicates that the column name is not the
	 * default value. This means it is 'usd_id' instead of 'usd_name'.
	 */
	protected $_PropertiesNameColumn = "id";
	//
	// Public class methods.
	/**
	 * This class method allows to get the sole instance of this holder.
	 *
	 * @return WCUserDataHolder Returns the singleton instance of this
	 * class.
	 */
	public static function Instance() {
		//
		// Checking if there's no instance yet.
		if(!isset(self::$_Instance)) {
			$c = __CLASS__;
			//
			// Creating the sole instance.
			self::$_Instance = new $c();
		}
		//
		// Returning the class instance.
		return self::$_Instance;
	}
}
?>